﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ConfirmExclusionPopup.ascx.cs" 
            Inherits="BuscadorDePreco.Controls.ConfirmationPopup" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<script type="text/javascript">
    function showLoading() {
        $("#MensagemDiv").css("display", "none");
        $("#ErrorDiv").css("display", "none");
        $("#LoadingPopupDiv").css("display", "block");
    }

    function resetPopup() {
        $("#MensagemDiv").css("display", "block");
        $("#ErrorDiv").css("display", "none");
        $("#LoadingPopupDiv").css("display", "none");
    }

    function hidePopup() {
        $find("ModalPopupExtender_Popup").hide();
    }
</script>
<asp:HyperLink ID="HiddenHL" runat="server" Style="display: none;" />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender_Popup" runat="server"
                    enabled="true"
                    TargetControlID="HiddenHL"
                    PopupControlID ="PanelModal"
                    BackgroundCssClass="modalBackground"
                    Drag="false"
                    DropShadow="true" ClientIDMode="Static"/>

<asp:Panel ID="PanelModal" runat="server" Style="Display:none;background: white;" CssClass="ModalPanel">
    <input type="hidden" id="ItemIdHdf" runat="server" clientidmode="Static" />
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <div id="MensagemDiv" runat="server" clientidmode="Static">
                <asp:Label ClientIDMode="Static" id="MensagemPopup" runat="server">Title</asp:Label>
                <br /><br />
                <asp:Button id="ButtonModalSim" runat="server" OnClick="ModalPopupYesBtn_Click" OnClientClick="showLoading();" Text="Sim" style="cursor: pointer;"  />
                <input type="button" id="ButtonModalNao" onclick="hidePopup();" value="Não" style="cursor: pointer;" />
            </div>
            
            <div id="ErrorDiv" runat="server" style="display: none;" clientidmode="Static">
                <asp:Label ClientIDMode="Static" id="MensagemErroPopup" runat="server">Error.</asp:Label>
                <br /><br />
                <input type="button" id="Button1" onclick="resetPopup();hidePopup();" value="OK" style="cursor: pointer;" />
            </div>

            <div id="LoadingPopupDiv" runat="server" clientidmode="Static" style="display: none;">
                <img alt="" src="/Resources/Images/loading.gif" width="100" height="100" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Panel>